#!/bin/sh
TIME=`date -d "-1 day" "+%Y-%m-%d"`
cd /root/backup/log
wget -c -t 0  http://account.trinitigame.com/auditlog/dinocap2.log.$TIME
sleep 120s
 sed -i -e '/whatday/!d' dinocap2.log.$TIME
sleep 25s
more /root/backup/log/dinocap2.log.$TIME|cut -b22- >/root/backup/log/dinocap2/$TIME
sleep 15s
cd /root/backup/log/dinocap2/
split -l 30000 $TIME $TIME
sleep 60s
cp /root/backup/log/dinocap2/$TIME'aa' /var/www/log/dinocap2/loga
cp /root/backup/log/dinocap2/$TIME'ab' /var/www/log/dinocap2/logb
sleep 60s
php -q /var/www/log/dinocap2/trunk/truncate.php
sleep 60s
php -q /var/www/log/dinocap2/trunk/dinocap2.php
sleep 600s
php -q /var/www/log/dinocap2/trunk/dinocap3.php
rm -rf  /root/backup/log/dinocap2/$TIME*
sleep 600s
php -q /var/www/log/dinocap2/trunk/del_query.php
sleep 120s
php -q /var/www/log/dinocap2/trunk/insert.php
sleep 600s
php -q /var/www/log/dinocap2/trunk/report_nojailbreak_30.php
sleep 600s
php -q /var/www/log/dinocap2/trunk/report_30.php
sleep 600s
php -q /var/www/log/dinocap2/trunk/report_week_nojailbreak.php

